﻿<UserControl
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:Microsoft_Windows_Themes="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Aero" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" x:Class="Indigo.Quibbler.Controls.SettingsToolbar"
    Height="Auto" Width="Auto" Foreground="#FFA9A4A9" mc:Ignorable="d">
    <UserControl.Resources>
	 <Storyboard x:Key="sbAnimation">
            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Path_123" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)" RepeatBehavior="Forever">
                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
                <SplineDoubleKeyFrame KeyTime="00:00:01.5000000" Value="360"/>
            </DoubleAnimationUsingKeyFrames>
        </Storyboard>
        <ControlTemplate x:Key="btnSettingsTemplate" TargetType="{x:Type Button}">
            <Border x:Name="border" BorderThickness="0" CornerRadius="4" VerticalAlignment="Stretch">
                <Border.Background>
                    <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                        <GradientStop Color="#FF191718"/>
                        <GradientStop Color="#FF1C1C1C" Offset="0.761"/>
                        <GradientStop Color="Black" Offset="0.517"/>
                        <GradientStop Color="#FF282828" Offset="0.39"/>
                        <GradientStop Color="#FF5B5B5B" Offset="1"/>
                    </LinearGradientBrush>
                </Border.Background>
                <TextBlock x:Name="textBlock" FontFamily="/Quibbler - Universal News Reader;Component/Fonts/#Frutiger LT Std" Foreground="#FFD0D0D0" FontSize="11" Text="{TemplateBinding Content}" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="3,0,3,0"/>
            </Border>
        	<ControlTemplate.Triggers>
        		<Trigger Property="IsEnabled" Value="False">
        			<Setter Property="Foreground" TargetName="textBlock" Value="#FF9A9A9A"/>
        		</Trigger>
        		<Trigger Property="IsPressed" Value="True">
        			<Setter Property="Background" TargetName="border">
        				<Setter.Value>
        					<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
        						<GradientStop Color="#FF191718"/>
        						<GradientStop Color="#FF1C1C1C" Offset="0.843"/>
        						<GradientStop Color="Black" Offset="0.244"/>
        						<GradientStop Color="#FF282828" Offset="0.074"/>
        						<GradientStop Color="#FF5B5B5B" Offset="1"/>
        					</LinearGradientBrush>
        				</Setter.Value>
        			</Setter>
        		</Trigger>
        	</ControlTemplate.Triggers>
        </ControlTemplate>
        <Storyboard x:Key="sbFlashStatus">
        	<ColorAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="textLastUpdate" Storyboard.TargetProperty="(TextElement.Foreground).(SolidColorBrush.Color)">
        		<SplineColorKeyFrame KeyTime="00:00:00" Value="#FF686868"/>
        		<SplineColorKeyFrame KeyTime="00:00:01.0000000" Value="#FFF0F0F0"/>
        		<SplineColorKeyFrame KeyTime="00:00:02.0000000" Value="#FF686868"/>
				<SplineColorKeyFrame KeyTime="00:00:03.000000" Value="#FFF0F0F0"/>
        		<SplineColorKeyFrame KeyTime="00:00:04.0000000" Value="#FF686868"/>
				<SplineColorKeyFrame KeyTime="00:00:05.0000000" Value="#FFF0F0F0"/>
        		<SplineColorKeyFrame KeyTime="00:00:06.0000000" Value="#FF686868"/>
				<SplineColorKeyFrame KeyTime="00:00:07.0000000" Value="#FFF0F0F0"/>
        		<SplineColorKeyFrame KeyTime="00:00:08.0000000" Value="#FF686868"/>
				<SplineColorKeyFrame KeyTime="00:00:09.0000000" Value="#FFF0F0F0"/>
        		<SplineColorKeyFrame KeyTime="00:00:10.0000000" Value="#FF686868"/>
				<SplineColorKeyFrame KeyTime="00:00:11.0000000" Value="#FFF0F0F0"/>
        		<SplineColorKeyFrame KeyTime="00:00:12.0000000" Value="#FF686868"/>
				<SplineColorKeyFrame KeyTime="00:00:13.0000000" Value="#FFF0F0F0"/>
        		<SplineColorKeyFrame KeyTime="00:00:14.0000000" Value="#FF686868"/>
			</ColorAnimationUsingKeyFrames>
        	<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="container" Storyboard.TargetProperty="(Border.BorderBrush).(GradientBrush.GradientStops)[1].(GradientStop.Offset)">
        		<SplineDoubleKeyFrame KeyTime="00:00:02" Value="1.1"/>
                <SplineDoubleKeyFrame KeyTime="00:00:14.0000000" Value="1.1"/>
                <SplineDoubleKeyFrame KeyTime="00:00:14.0000000" Value="-0.1" />
        	</DoubleAnimationUsingKeyFrames>
        </Storyboard>
    </UserControl.Resources>
	<Border x:Name="container" Padding="3" CornerRadius="3" BorderThickness="2">
		<Border.BorderBrush>
			<LinearGradientBrush EndPoint="1.1,1.1" StartPoint="-0.1,-0.1">
				<GradientStop Color="Transparent" Offset="0"/>
				<GradientStop Color="#CCBDBDBD" Offset="-0.1"/>
				<GradientStop Color="Transparent" Offset="1"/>
			</LinearGradientBrush>
		</Border.BorderBrush>
    <Grid x:Name="gridLayout" Height="Auto">
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*"/>
            <ColumnDefinition Width="5" />
            <ColumnDefinition Width="*" MinWidth="50"/>
            <ColumnDefinition Width="5"/>
            <ColumnDefinition Width="*" MinWidth="50"/>
            <ColumnDefinition Width="5"/>
            <ColumnDefinition Width="Auto"/>
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="20"/>
        </Grid.RowDefinitions>
        <Button x:Name="btnThemes" Grid.Column="0" Grid.Row="0" Content="THEMES"  Template="{DynamicResource btnSettingsTemplate}" Background="{x:Null}" BorderBrush="{x:Null}" IsEnabled="True" Cursor="Hand" Visibility="Collapsed"/>
        <Button x:Name="btnSettings" Grid.Column="2" Grid.Row="0" Content="SETTINGS" Template="{DynamicResource btnSettingsTemplate}" Cursor="Hand"/>
		<TextBlock x:Name="txtOnlineStatus" Grid.Column="4" Grid.Row="0" HorizontalAlignment="Center" VerticalAlignment="Center" FontFamily="/Quibbler - Universal News Reader;Component/Fonts/#Frutiger LT Std" FontSize="11" Text="Offline" Foreground="#FFDA3030"/>
    	<StackPanel Grid.Column="6" Orientation="Horizontal" d:LayoutOverrides="Height">
    		<Canvas x:Name="cnvSpiral" HorizontalAlignment="Center" Margin="-20,0,-20,0" VerticalAlignment="Center" Width="60" IsHitTestVisible="False" Height="60" RenderTransformOrigin="0.5,0.5" Visibility="Collapsed">
    			<Canvas.RenderTransform>
    				<TransformGroup>
    					<ScaleTransform ScaleX="0.3" ScaleY="0.3"/>
    					<SkewTransform/>
    					<RotateTransform/>
    					<TranslateTransform/>
    				</TransformGroup>
    			</Canvas.RenderTransform>
    			<Path x:Name="Path_115" Stretch="Fill" StrokeThickness="1.33333" StrokeLineJoin="Round" Stroke="#BD2F5178" Fill="#BD000000" Data="F1 M 353.696,239.263C 353.696,255.852 340.245,269.3 323.656,269.3C 307.077,269.3 293.628,255.852 293.628,239.263C 293.628,222.673 307.077,209.225 323.656,209.225C 340.245,209.225 353.696,222.673 353.696,239.263 Z " Height="61.4080047607422" Width="61.4010009765625" Canvas.Left="0.323" Canvas.Top="0.194" HorizontalAlignment="Left" VerticalAlignment="Top" Visibility="Collapsed"/>
    			<Path x:Name="Path_122" Stretch="Fill" Data="F1 M 306.69,239.263C 306.69,229.9 314.305,222.285 323.657,222.285C 333.02,222.285 340.635,229.9 340.635,239.263C 340.635,248.624 333.02,256.24 323.657,256.24C 314.305,256.24 306.69,248.624 306.69,239.263 Z M 298.621,239.263C 298.621,253.073 309.857,264.309 323.657,264.309C 330.347,264.309 336.638,261.703 341.367,256.973C 346.098,252.242 348.703,245.953 348.703,239.263C 348.703,232.572 346.098,226.283 341.367,221.553C 336.638,216.822 330.347,214.217 323.657,214.217C 309.857,214.217 298.621,225.451 298.621,239.263 Z " Height="50.0920104980469" Width="50.0820007324219" Canvas.Left="5.983" Canvas.Top="5.853" HorizontalAlignment="Left" VerticalAlignment="Top">
    				<Path.Fill>
    					<LinearGradientBrush EndPoint="0.921,0.5" StartPoint="0.001,0.472">
    						<GradientStop Color="DarkGray" Offset="0"/>
    						<GradientStop Color="#FF2A2929" Offset="1"/>
    					</LinearGradientBrush>
    				</Path.Fill>
    			</Path>
    			<Path x:Name="Path_123" RenderTransformOrigin="2.193,0.16" Height="7.919" Width="12.614" Canvas.Left="5.944" Canvas.Top="31.367" HorizontalAlignment="Left" VerticalAlignment="Top" Fill="Black" Stretch="Fill" Data="M11.580619,3.6359324E-09 L-0.45643857,1.4908475 L0.080591938,0.5 C-0.31421287,3.7223772 -0.24745662,8.1685615 0.50244132,9.5849166 L12.225832,7.7970788 C11.642472,5.4637387 11.580619,3.6359324E-09 11.580619,3.6359324E-09 z">
    				<Path.RenderTransform>
    					<TransformGroup>
    						<ScaleTransform ScaleX="1" ScaleY="1"/>
    						<SkewTransform AngleX="0" AngleY="0"/>
    						<RotateTransform Angle="-84"/>
    						<TranslateTransform X="-2.050793576093362" Y="-2.3537874911891308"/>
    					</TransformGroup>
    				</Path.RenderTransform>
    			</Path>

    		</Canvas>
    		<TextBlock x:Name="textLastUpdate" HorizontalAlignment="Center" VerticalAlignment="Center" FontFamily="/Quibbler - Universal News Reader;Component/Fonts/#Frutiger LT Std" FontSize="11" Margin="0" Foreground="#FF686868" ToolTip="Content status" Text="Updated: Just Now"/>
    	</StackPanel>
    </Grid>
	</Border>
</UserControl>
